<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>WinMinimize</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>WinMinimize</h1>

<p>Collapses the specified window into a button on the task bar.</p>

<pre class="Syntax">WinMinimize [, WinTitle, WinText, ExcludeTitle, ExcludeText]</pre>
<h3>Parameters</h3>
<dl>

  <dt>WinTitle</dt>
  <dd><p>A window title or other criteria identifying the target window. See <a href="../misc/WinTitle.htm">WinTitle</a>.</p></dd>

  <dt>WinText</dt>
  <dd><p>If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if <a href="DetectHiddenText.htm">DetectHiddenText</a> is ON.</p></dd>

  <dt>ExcludeTitle</dt>
  <dd><p>Windows whose titles include this value will not be considered.</p></dd>

  <dt>ExcludeText</dt>
  <dd><p>Windows whose text include this value will not be considered.</p></dd>

</dl>

<h3>Remarks</h3>
<p>Use <a href="WinRestore.htm">WinRestore</a> or <a href="WinMaximize.htm">WinMaximize</a> to unminimize a window.</p>
<p>If a particular type of window does not respond correctly to WinMinimize, try using the following instead:</p>
<pre><a href="PostMessage.htm">PostMessage</a>, 0x112, 0xF020,,, WinTitle, WinText <em>; 0x112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE</em></pre>
<p>This command operates only upon the topmost matching window except when <em>WinTitle</em> is <a href="GroupAdd.htm">ahk_group GroupName</a>, in which case all windows in the group are affected.</p>
<p>Window titles and text are case sensitive. Hidden windows are not detected unless <a href="DetectHiddenWindows.htm">DetectHiddenWindows</a> has been turned on.</p>

<h3>Related</h3>
<p><a href="WinRestore.htm">WinRestore</a>, <a href="WinMaximize.htm">WinMaximize</a>, <a href="WinMinimizeAll.htm">WinMinimizeAll</a></p>
<h3>Example</h3>
<pre class="NoIndent">Run, notepad.exe
WinWait, Untitled - Notepad
WinMinimize <em>; use the window found above</em>

^Down::WinMinimize, A  <em>; Assign a hotkey to minimize the active window.</em></pre>

</body>
</html>
